//package com.itheima.web.old;
///**
// * Create By Awen on 2021/8/25
// *
// * @author Awen
// */
//
//import com.itheima.pojo.Result;
//import com.itheima.service.UserService;
//import com.itheima.web.BaseController;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@WebServlet("/deleteUserServlet")
//public class DeleteUserServlet extends HttpServlet {
//    @Override
//    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        try {
//            String id = request.getParameter("id");
//            UserService userService = new UserService();
//            userService.deleteUserById(id);
//            Result result = new Result(true, "删除成功", null);
//            BaseController.responseJson(response,result);
//        } catch (Exception e) {
//            e.printStackTrace();
//            Result result = new Result(true, "删除失败", null);
//            BaseController.responseJson(response,result);
//        }
//
//    }
//
//    @Override
//    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        doGet(request, response);
//    }
//}
